-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow retrying Delivery::{ack, nack} #24
Conversation
d5e0c95
to
30978ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the motivation, but conceptually I actually like that ack
/nack
consumes the delivery, since a delivery shouldn't be modified after it's been successfully ack
/nack
ed.
I think a better approach would be to embed Self
in one of the return values in the Error condition. That way, you could only retry acks/nacks if those operations failed.
That might be a more complicated change though, so I'm fine approving as is.
It's not much more complicated. And the server code has to change in weird ways in either case, FWIW. |
Lets try that then. If it ends up being too complicated, I can just merge this as is. |
… by returning `self` on failure.
30978ce
to
ca9ce8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (if you update the PR title and message I can merge)
Right, missed that. Done. |
… implementation (#1188) ~~Depends on #1185 (merged), svix/omniqueue-rs#24 I have deleted low-level tests for the in-memory queue since its basic functionality should be tested inside omniqueue, not here. Do we have tests for higher-level functionality that uses the in-memory queue backend in some scenarios? The redis and SQS implementation should probably be replaced by the implementations found in Omniqueue in a follow-up PR, to keep this one reasonably small.
… by returning
self
on failure.Also improve docs a little bit.